package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CoursePlayHistoryMapper;
import com.ruoyi.system.domain.CoursePlayHistory;
import com.ruoyi.system.service.ICoursePlayHistoryService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-20
 */
@Service
public class CoursePlayHistoryServiceImpl implements ICoursePlayHistoryService 
{
    @Autowired
    private CoursePlayHistoryMapper coursePlayHistoryMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public CoursePlayHistory selectCoursePlayHistoryById(Long id)
    {
        return coursePlayHistoryMapper.selectCoursePlayHistoryById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param coursePlayHistory 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<CoursePlayHistory> selectCoursePlayHistoryList(CoursePlayHistory coursePlayHistory)
    {
        return coursePlayHistoryMapper.selectCoursePlayHistoryList(coursePlayHistory);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param coursePlayHistory 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertCoursePlayHistory(CoursePlayHistory coursePlayHistory)
    {
        coursePlayHistory.setCreateTime(DateUtils.getNowDate());
        return coursePlayHistoryMapper.insertCoursePlayHistory(coursePlayHistory);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param coursePlayHistory 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCoursePlayHistory(CoursePlayHistory coursePlayHistory)
    {
        coursePlayHistory.setUpdateTime(DateUtils.getNowDate());
        return coursePlayHistoryMapper.updateCoursePlayHistory(coursePlayHistory);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCoursePlayHistoryByIds(Long[] ids)
    {
        return coursePlayHistoryMapper.deleteCoursePlayHistoryByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCoursePlayHistoryById(Long id)
    {
        return coursePlayHistoryMapper.deleteCoursePlayHistoryById(id);
    }
}
